package com.hzit.page.controller;

import com.hzit.page.service.PageService;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Controller
@RequestMapping("/page")
public class PageController {

	@Autowired
	private PageService pageService;
	//1. 根据商品id生成静态页面
	@GetMapping("/genPage/{goodsId}")
	@ResponseBody
	public AjaxResult genPage(@PathVariable("goodsId") Long goodsId) throws IOException, InvocationTargetException, IllegalAccessException {
		return pageService.genPage(goodsId);
	}
}
